import ins from "../utils/request";

export function list() {
    return ins.get('/cart')
}

export function addItem(obj) {
    return ins.post('/cart', obj)
}

export function deleteItem(id) {
    return ins.delete(`/cart/${id}`)
}

export function editItem(id, obj) {
    return ins.patch(`cart/${id}`, obj)
}

export function searchItem(val) {
    return ins.get('/cart?name_like=' + val)
}